package com.gaga.console.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gaga.console.base.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author liujia
 * @since 2023-12-06
 */
@Data
@Accessors(chain = true)
@TableName("account_record")
@ApiModel(value = "AccountRecord对象", description = "用户信息表")
public class AccountRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("Id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("账目类型 0 支出 1 收入")
    private Integer accountType;

    @ApiModelProperty("分类类型")
    private Integer categoryType;


    @ApiModelProperty("金额")
    private BigDecimal money;

    @ApiModelProperty("账目日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date accountTime;


}
